package com.example1.demo.demoMybatis.controller;

import org.springframework.web.bind.annotation.RestController;

import com.example1.demo.demoMybatis.Goods;
import com.example1.demo.demoMybatis.mapper.GoodMapper;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;


@RestController
public class GoodController {

    @Autowired
    private GoodMapper goodMapper;

    @GetMapping("/good")
    public String query(){

        List<Goods> goods = goodMapper.find();
        System.out.println(goods);
        return "查询商品";
    }
    
}
